#pragma once

#include <Windows.h>

#include <stdio.h>
#include <io.h>

#include <fcntl.h>

#include <fstream>
#include <iostream>
using namespace std;

class Win32Console
{
public:
	~Win32Console();

	static Win32Console* GetInstance();

	//void Allocate();
	//void Free();

	//void __cdecl Write(string format, ...);
	//void __cdecl Write(string format, va_list ap);
	//void __cdecl writeLine(string format, ...);
	//void __cdecl WriteLine(string format, va_list ap);

private:
	bool	isAllocated;

    FILE	or_stdin;
    FILE	or_stdout;
    int		osf_in;
    int		osf_out;
    FILE*	fd_in;
    FILE*	fd_out;

	static Win32Console* instance;
	Win32Console();
};

